<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="contextPath" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
	<link rel="stylesheet" type="text/css" href="${contextPath}/styles/styles.css"/>
	<title>Design Webshop Maria Freudenreich</title>
</head>

<body>
	<center>
		<jsp:include page="./pageLayout/header.jsp" />
		<div class="body" style="background-image: url(${contextPath}/images/bodyBackground.png);">
			<div class="sidebar">
				<div class="button"><a href="./index.html">Home</a></div>
				<div class="button"><a href="./flows/registration.html">Login</a></div>
				<div class="button"><a href="./flows/order.html">Warenkorb</a></div>
			</div>
			<div class="innerBody">
				<% try {
					if (request.getQueryString().contains("success")) {
				%>
					<div class="statusMessage">
						<h4>Erfolgreich gespeichert!</h4>
					</div>
				<%
					} else ;
				} catch (Exception e) {}
				%>
				<form:form method="POST" commandName="customer">
					<table>
						<tr>
							<td>Titel:</td>
							<td colspan="3"><form:input path="person.title" size="40"/></td>
						</tr>
						<tr>
							<td>Anrede:</td>
							<td colspan="3">
								<form:radiobutton path="person.gender" value="Herr" label="Herr" />
								<form:radiobutton path="person.gender" value="Frau" label="Frau" />
							</td>
						</tr>
						<tr>
							<td>Vorname:</td>
							<td colspan="3"><form:input path="person.firstName" size="40"/></td>
						</tr>
						<tr>
							<td>Nachname:</td>
							<td colspan="3"><form:input path="person.lastName" size="40"/></td>
						</tr>
						<tr>
							<td>Stra&szlig;e:</td>
							<td><form:input path="person.listOfAdresses[0].street" size="26"/></td>
							<td>Nr.:</td>
							<td><form:input path="person.listOfAdresses[0].number" size="5"/></td>
						</tr>
						<tr>
							<td>Zusatz:</td>
							<td colspan="3"><form:input path="person.listOfAdresses[0].additionalInfo" size="40"/></td>
						</tr>
						<tr>
							<td>Stadt:</td>
							<td><form:input path="person.listOfAdresses[0].city" size="26"/></td>
							<td>PLZ:</td>
							<td><form:input path="person.listOfAdresses[0].zipCode" size="5"/></td>
						</tr>
						<tr>
							<td>Bundesland:</td>
							<td colspan="3"><form:input path="person.listOfAdresses[0].state" size="40"/></td>
						</tr>
						<tr>
							<td>Land:</td>
							<td colspan="3"><form:input path="person.listOfAdresses[0].country" size="40"/></td>
						</tr>
						<tr>
							<td>Email Adresse:</td>
							<td colspan="3"><form:input path="person.eMail" size="40"/></td>
						</tr>
						<tr>
							<td>Telefonnummer:</td>
							<td colspan="3"><form:input path="person.phoneNumber" size="40"/></td>
						</tr>
						<tr>
							<td>Geburtsdatum:</td>
							<td colspan="3"><form:input path="dateOfBirth" size="40"/></td>
						</tr>
						<tr>
							<td colspan="3"><input type="submit" value="Speichern"/></td>
						</tr>
					</table>
				</form:form>
			</div>
		</div>
	</center>
</body>
</html>
